#include "APP_TDS.h"


//初始化TDS功能
void App_TDS_Init(void){
    Interface_ADS1115_Init();
}


//获取tds值
double App_TDS_GetTDS(void){

    //获取外置ADS转换结果
    double v1 =  Interface_ADS1115_GetV();
    //debug_printfln("ADCv = %.2lf\r\n", v1);

    double v2 = v1 * v1;
    double v3 = v2 * v1;

    return 66.71 * v3 - 127.93 * v2 + 428.7 * v1;
}
